<{include file="header.html"}>
<div class='title-nav'>文章列表 - <a href="/admin.php?c=Article&a=post" style='padding: 5px;background: #eaeaea;font-size: 0.8em;' title='查看所有文章'>全部</a></div>
<form action='' method='post'>
<div class='article-list'>
	<table cellspacing="0" cellpadding="0">
		<tr>
			<th><input type="checkbox" id="btu" value="全选" /></th>
			<th></th>
			<th>标题</th>
			<th>作者</th>
			<th>分类</th>
			<th>日期</th>
			<th>允许评论</th>
		</tr>
		<{foreach from=$article item=value}>
			<tr>
				<td><input name="a[]" type="checkbox" value="<{$value.aid}>" /></td>
				<td><div class='comment-num'><a href="/admin.php?c=Comment&a=show&aid=<{$value.aid}>" title='点击查看此文章的所有评论'><{$value.comnum}></a></div></td>
				<td>
					<{if $value.top eq y}><span class='top'>置顶</span><{/if}>
					<{if $value.hide eq y}><span class='draft'>草稿</span><{/if}>
					<a href="/admin.php?c=Article&a=edit&aid=<{$value.aid}>" title='点击编辑此文章'><{$value.title}></a>
				</td>
				<td><a href="/admin.php?c=Article&a=post&userid=<{$value.userid}>" title='查看该用户所有文章'><{$value.uid}></a></td>
				<td><a href="/admin.php?c=Article&a=post&sortid=<{$value.sortid}>" title='查看该分类下所有文章'><{$value.sortname}></a></td>
				<td><{$value.date}></td>
				<td><{if $value.allow_remark eq n}><span style='color:#c7254e;font-size: 0.8em;padding: 5px; background: #f9f2f4;'>禁止</span><{else}><span style='color:green;font-size: 0.8em;padding: 5px; background: #EAEAEA;'>允许</span><{/if}></td>
			</tr>
		<{foreachelse}>
			暂无数据
		<{/foreach}>
	</table>
</div>
<div class='page'>
	<div class='page-left'>
		<select name='type'  class='sel'>
			<option value='-1' selected = "selected">选项</option>
			<option value='delete'>删除</option>
		</select>
		<input type='submit' value='提交' onclick="return confirm('确定你的操作？')" class='sub' />
	</div>
	<div class='page-right'>
		<ul>
			<li> <a href="#" class='menu'>1</a></li>
			<li> <a href="#">2</a></li>
			<li> <a href="#">3</a></li>
			<li> <a href="#">4</a></li>
			<li> <a href="#">5</a></li>
			<li> <a href="#">》</a></li>
		</ul>
	</div>
</div>
</form>
<{include file="footer.html"}>
<script type="text/javascript">

	window.onload=function()
	{
		var arr =document.getElementsByTagName('input');
		var b = document.getElementById("btu");
		var iSelect=true;
		b.onclick=function()
		{
			if(iSelect==true)
			{
				for(var i=0;i<arr.length;i++)
				{
					arr[i].checked=true;
				}
				iSelect=false;
				b.value='反选';
			}
			else if(iSelect==false)
			{
				for(var i=0;i<arr.length;i++)
				{
					arr[i].checked=false;
				}
				iSelect=true;
				b.value='全选';
			}

		}
	}
</script>